package p15.p1524;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class DieDai {
    public static void main(String[] args) {
        List list = new ArrayList();
        ArrayList arrayList = new ArrayList();//

        list.add("hello");
        list.add("world");
        list.add("java");
        Iterator iterator = list.iterator();
        while (iterator.hasNext()) {

            String s = (String) iterator.next();
            if (s.equals("java")) {
                list.add("javaee");
            }
            System.out.println(s);
        }
    }
}
